'''
Created on 2012-3-28下午2:36:12
简单的循环例子
@author: nagat
@email:  yasenagat@gmail.com
'''

# for 循环与迭代

for i in [1,2,3,4,5,6]:
    print('原数',i,'成2后的值',i*2)
    
for i in range(1,10):
    print('原数:',i,'除二后:',i/2)
    
#range(i,j,[步长值])
for i in range(1,10,3):
    print(i)

#打印hello每一个字符  
for c in 'hello':
    print(c)
    
#打印列表成员
for c in ['Jack','Cate']:
    print(c)

#打印每一个key和value
obj = {'1':'a','2':'b'}
for key in obj:
    print(key,obj[key])